package fr.afcepf.atod16.groupe1.projet1.dto.administration;

import fr.afcepf.atod16.groupe1.projet1.dto.Dto;
import fr.afcepf.atod16.groupe1.projet1.enumerations.Role;

/**
 * Le DTO compte employe
 * @author cedric
 */
public class DtoCompteEmploye implements Dto {

    private Integer id;
    private String login;
    private String pass;
    private String civilite;
    private String nom;
    private String prenom;
    private String email;
    private Role roleEmploye;

    public DtoCompteEmploye() {
    }

    public DtoCompteEmploye(Integer id, String login, String pass, String civilite, String nom, String prenom, String email, Role roleEmploye) {
        this.id = id;
        this.login = login;
        this.pass = pass;
        this.civilite = civilite;
        this.nom = nom;
        this.prenom = prenom;
        this.email = email;
        this.roleEmploye = roleEmploye;
    }

    @Override
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    public String getCivilite() {
        return civilite;
    }

    public void setCivilite(String civilite) {
        this.civilite = civilite;
    }

    public String getNom() {
        return nom;
    }

    public void setNom(String nom) {
        this.nom = nom;
    }

    public String getPrenom() {
        return prenom;
    }

    public void setPrenom(String prenom) {
        this.prenom = prenom;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Role getRoleEmploye() {
        return roleEmploye;
    }

    public void setRoleEmploye(Role roleEmploye) {
        this.roleEmploye = roleEmploye;
    }

    @Override
    public String toString() {
        return "DtoCompteEmploye{" + "id=" + id + ", login=" + login + ", pass=" + pass + ", civilite=" + civilite + ", nom=" + nom + ", prenom=" + prenom + ", email=" + email + ", roleEmploye=" + roleEmploye + '}';
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 59 * hash + (this.id != null ? this.id.hashCode() : 0);
        hash = 59 * hash + (this.login != null ? this.login.hashCode() : 0);
        hash = 59 * hash + (this.pass != null ? this.pass.hashCode() : 0);
        hash = 59 * hash + (this.civilite != null ? this.civilite.hashCode() : 0);
        hash = 59 * hash + (this.nom != null ? this.nom.hashCode() : 0);
        hash = 59 * hash + (this.prenom != null ? this.prenom.hashCode() : 0);
        hash = 59 * hash + (this.email != null ? this.email.hashCode() : 0);
        hash = 59 * hash + (this.roleEmploye != null ? this.roleEmploye.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final DtoCompteEmploye other = (DtoCompteEmploye) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        if ((this.login == null) ? (other.login != null) : !this.login.equals(other.login)) {
            return false;
        }
        if ((this.pass == null) ? (other.pass != null) : !this.pass.equals(other.pass)) {
            return false;
        }
        if ((this.civilite == null) ? (other.civilite != null) : !this.civilite.equals(other.civilite)) {
            return false;
        }
        if ((this.nom == null) ? (other.nom != null) : !this.nom.equals(other.nom)) {
            return false;
        }
        if ((this.prenom == null) ? (other.prenom != null) : !this.prenom.equals(other.prenom)) {
            return false;
        }
        if ((this.email == null) ? (other.email != null) : !this.email.equals(other.email)) {
            return false;
        }
        if (this.roleEmploye != other.roleEmploye) {
            return false;
        }
        return true;
    }
}
